﻿using System.Windows.Forms;
using Deferred.Editor.Scene;
using Deferred.Library.Scene;

namespace Deferred.Editor.Gui.Scene
{
    public partial class PointLightPanel : UserControl
    {
        public PointLightPanel(PointLight light)
        {
            InitializeComponent();

            pointLightWrapperBindingSource.DataSource = new PointLightWrapper(light);
            pointLightBindingSource.DataSource = light;
        }

        private void upDownValueChanged(object sender, System.EventArgs e)
        {
            pointLightBindingSource.EndEdit();
        }

        private void wrapperUpDownValueChanged(object sender, System.EventArgs e)
        {
            pointLightWrapperBindingSource.EndEdit();
        }
    }
}
